<?php

function getRevisionSignature()
{
	$svn = '$Rev: 77 $ - $Date: 2007-12-31 18:06:42 +0000 (Mon, 31 Dec 2007) $';
	$re = '/^\$Rev:\s([0-9]+)\s\$\s-\s\$Date:\s([0-9]{4}-[0-9]{2}-[0-9]{2})/';
	preg_match( $re, $svn, $m );

	return "{$m[1]} ({$m[2]})";
}

echo "Rev: " . getRevisionSignature() . "\n";
